//
//  SEGKitHelper.h
//  ExcellentHome
//
//  Created by 刘山 on 2017/11/13.
//  Copyright © 2017年 陈区. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


@interface SEGKitHelper : NSObject
/**
 * 设置富文本
 * @author Sam
 */
+ (NSMutableAttributedString *)seg_TextWithString:(NSString *)textString fontSize:(CGFloat)fontSize textColor:(UIColor *)textColor;

+ (CGSize)seg_sizeWithString:(NSString *)textString
                    fontSize:(CGFloat)fontSize
                   textColor:(UIColor *)textColor;

+ (NSMutableAttributedString *)seg_TextWithString:(NSString *)textString fontSize:(CGFloat)fontSize textColor:(UIColor *)textColor  lineSpacing:(CGFloat)lineSpacing;

+ (NSMutableAttributedString *)seg_textWithString:(NSString *)textString
                                      topicString:(NSString *)topicString
                                         fontSize:(CGFloat)fontSize
                                        textColor:(UIColor *)textColor;

+ (NSAttributedString *)seg_attachmentWithFontSize:(CGFloat)fontSize image:(UIImage *)image shrink:(BOOL)shrink;
+ (CGFloat)seg_heightForOneLineWIthFontSize:(CGFloat)fontSize;

/**
 * 图片转成富文本
 * @author Sam
 * @param img  图片
 * @param fontSize  富文本字体大小
 */
+ (NSAttributedString *)segAttachmentWithImage:(UIImage*)img FontSize:(CGFloat)fontSize;

/**
 * 图片转成富文本
 * @author Sam
 * @param img  图片
 * @param fontSize  富文本字体大小
 * @param contentInsets  间距大小UIEdgeInsets:(CGFloat top, CGFloat left, CGFloat bottom, CGFloat right)
 */
+ (NSAttributedString *)segAttachmentWithImage:(UIImage*)img FontSize:(CGFloat)fontSize contentInsets:(UIEdgeInsets)contentInsets;
@end
